package com.mango.ch10;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

import org.apache.hadoop.io.Writable;

public class C3Pair implements Writable {
	private String _1;
	private int _2;
	private int _3;

	public String get_1() {
		return _1;
	}

	public void set_1(String _1) {
		this._1 = _1;
	}

	public int get_2() {
		return _2;
	}

	public void set_2(int _2) {
		this._2 = _2;
	}

	public int get_3() {
		return _3;
	}

	public void set_3(int _3) {
		this._3 = _3;
	}

	public C3Pair() {
	}

	public C3Pair(String _1, int _2, int _3) {
		super();
		this._1 = _1;
		this._2 = _2;
		this._3 = _3;
	}

	@Override
	public String toString() {
		return _1 + "\t" + _2 + "\t" + _3;
	}

	@Override
	public void write(DataOutput out) throws IOException {
		// TODO Auto-generated method stub
		out.writeUTF(this._1);
		out.writeInt(this._2);
		out.writeInt(this._3);
	}

	@Override
	public void readFields(DataInput in) throws IOException {
		// TODO Auto-generated method stub
		this._1 = in.readUTF();
		this._2 = in.readInt();
		this._3 = in.readInt();
	}

}
